package com.service;

import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@RabbitListener


@Component
@RabbitListener(queues = {"fanoutQueue2"})
public class RabbitMqFanoutListener2 {

    @RabbitHandler
    public void proccess1(String msg)
    {
        System.out.println("这是队列2收到的消息:"+msg);
    }
}
